﻿using FluentNHibernate.Mapping;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WebSite.Model;

namespace WebSite.Data.NH.Repositories.Mappings
{
    public class MoudleMap : ClassMap<MoudleInfo>
    {
        public MoudleMap()
        {
            Table("MoudleInfo");
            LazyLoad();
            Cache.ReadWrite().IncludeAll();
            Id(x => x.MoudleId).GeneratedBy.Identity().Column("MoudleId");
            Map(x => x.MoudleName).Column("MoudleName");
            Map(x => x.Address).Column("Address");
            Map(x => x.ParentId).Column("ParentId");
            Map(x => x.Order).Column("[Order]");
            Map(x => x.IsEnable).Column("IsEnable");
            Map(x => x.CompanyId).Column("CompanyId");
        }
    }
}
